-
-
Notifications
You must be signed in to change notification settings - Fork 32
Add an initial test app #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much, really appreciated.
|
||
public void setName(String name) { | ||
this.name = name; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ParseObject using key-value pair to manage data.
You need to use put(key, value)/get(key) inside your getter/setter. (That's why you can't retrieve data from the server.)
ex.
@ParseClassName("Room")
public class Room extends ParseObject {
public Room() {
}
public String getName() {
return getString("name");
}
public void setName(String name) {
put("name", name);
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue in Message.java as well.
|
||
public class MainActivity extends AppCompatActivity { | ||
|
||
String URL = "http://192.168.3.9:1337/parse/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable named uppercase URL may be confused with the URL class.
String url
I recommend using lowercase to improve readability.
public void done(Room room, ParseException e) { | ||
if (e != null) { | ||
Log.d(DEBUG_TAG, "Found exception" + e); | ||
e.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need deal with the exceptions?
// op=subscribe, className=Message, roomName=null, requestId=1, order=createdAt | ||
ParseQuery<Message> parseQuery = ParseQuery.getQuery(Message.class); | ||
// FIXME | ||
parseQuery.whereEqualTo("roomName", "test"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should parseQuery.whereEqualTo("room", room);
?
hermanliang has really good comments, waiting for edit first
Related to issue: parse-community#14 Currently only the conditions and class name are encoded: https://github.com/ParsePlatform/ParseLiveQuery-iOS-OSX/blob/master/Sources/ParseLiveQuery/Internal/QueryEncoder.swift
Patch OkHttp3
Mostly for reference. Based on iOS Xcode app.